using MeetingManagement.Infrastructure;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace MeetingManagement.WebApi.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    [Authorize]
    public class SystemMessagesController : ControllerBase
    {
        [HttpGet]
        public IActionResult Get()
        {
            var userId = User.GetUserId();
            var messages = SystemMessageService.GetMessages(userId);
            return Ok(messages);
        }
    }
}
